import Mock from 'mockjs'
const grafes = Mock.mock({
  'items|10': [
    {
      'setBaseId': '@id',
      'batchName': '@name',
      'craftName': '@cname',
      'createTime': '@now',
      'outCode': '@id',
      'testBatchId': '@id()',
      'testBatchName': '@ctitle',
      'testStatus|1': [1, 0]
    }
  ]
})
const items = Mock.mock({
  'list|10': [
    {
      'chkNum|1-10': 1,
      'chkValue|1-100': 1,
      'examType': 0,
      'judgeNum': 0,
      'judgeValue|1-100': 1,
      'operateRadio|1-100': 1,
      'outCode': '@id',
      'radioNum|1-30': 1,
      'radioValue|1-60': 2,
      'setBaseId': '@id',
      'setBasePass|1-150': 12,
      'setBaseStatus|1': [1, 0],
      'setBaseTime|1-3000': 1,
      'setBaseTotal|1-150': 1,
      'setdetailes|5': [
        {
          'radio|1-10': 1,
          'setBaseId|1': ['高压', '低压', '特种']
        }
      ],
      'theoryRadio|1-100': 1
    }
  ]
})
const pub = {
  isMore: 0,
  pageIndex: 1,
  pageSize: 10,
  startIndex: 0,
  totalNum: 30,
  totalPage: 1
}
const dictMap = {

}
export default [
  // 03-01-06获取考试设置
  {
    url: '/elec/testbatch/getSetbaseById',
    type: 'get',
    response: config => {
      const tags = items.list[0]
      return {
        code: 1,
        data: {
          ...tags
        },
        dictMap: { ...dictMap },
        msg: ''
      }
    }
  },
  //   03-01-01分页查询题库管理集合
  {
    url: '/elec/testbatch/getTestbatchListPage',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: { ...grafes, ...pub },
        dictMap: { ...dictMap },
        msg: ''
      }
    }
  },
  // 03-01-05修改题库设置
  {
    url: '/elec/testbatch/modifySetBase',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        dictMap: { ...dictMap },
        msg: ''
      }
    }
  },

  // 03-01-03修改题库批次
  {
    url: '/elec/testbatch/modifyTestbatch',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: {},
        msg: '修改成功'
      }
    }
  },
  // 03-01-05删除题库设置
  {
    url: '/elec/testbatch/removeSetBase',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: { },
        msg: ''
      }
    }
  },
  //   03-01-04删除题库批次
  {
    url: '/elec/testbatch/removeTestbatch',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: { },
        msg: ''
      }
    }
  },
  //   03-01-02保存题库批次
  {
    url: '/elec/testbatch/saveTestbatch',
    type: 'post',
    response: config => {
      return {
        code: 1,
        data: { },
        msg: ''
      }
    }
  }
]
